const mongoose = require("mongoose");
const dotenv = require("dotenv");

dotenv.config({ path: "./config.env" });

const Local_DB = process.env.DATABASE_LOCAL_URL;
const mongoUri =
  "mongodb+srv://oldboy:LGNAWA8I2UAgutbZ@cluster0.ipcxx.mongodb.net/priceDB?retryWrites=true";

mongoose
  .connect(Local_DB, { useNewUrlParser: true, useUnifiedTopology: true })
  .then(() => {
    console.log("连接成功！");
  })
  .catch((error) => {
    console.log("Altas Cluster connection error", error);
  });
